A virtual tape system including a tape library and a virtual tape device is known. The tape library houses physical volumes (hereinafter, expressed as PVs) such as magnetic tape cartridges or optical disk cartridges.
The virtual tape device is provided between a host device and the tape library and includes a tape volume cache (TVC) storing therein logical volumes (hereinafter, expressed as LVs) serving as volumes recognized by the host device. The TVC is realized by a storage device or the like having, for example, a redundant array of inexpensive disks (RAID) configuration.
As exemplified in FIG. 23, a virtual tape system 100 may perform volume carry-out (export) processing for writing LVs 220 (expressed as an LV1 to an LV3) from a TVC 210 in a virtual tape device 200 to a PV 310 in a tape library 300 and carrying out the relevant PV 310. By performing the export processing, it becomes possible for data of the LVs 220 to be stored outside the tape library 300 or to be used by another tape library.
As exemplified in FIG. 24, a request (export request) for the export processing is issued by a host device 400, another management server, or the like. The export request includes an LV list 410. The LV list 410 is, for example, a text file. The virtual tape device 200 stores the LVs 220 specified in the LV list 410 in a PV 310 for export, as LVs 320, in an order described in, for example, the LV list 410 (see S241 to S243 in FIG. 24).
As exemplified in FIG. 25, the LVs 220 specified in the LV list 410 are in an on-cache state (for example, the LV2 and the LV3) in which data thereof exists in the TVC 210 and in an off-cache state (for example, the LV1) in which data thereof does not exist in the TVC 210.
Regarding the off-cache LV1, the virtual tape device 200 performs recall processing for reading the LV1 from a PV 310 for saving, in which the relevant LV1 is saved (migrated), to the TVC 210 (see S251 in FIG. 25). Then, the virtual tape device 200 writes, to the PV 310 for export, the LV1 read to the TVC 210 by the recall (see S252 in FIG. 25).
On the other hand, regarding the on-cache LV2 and LV3, the virtual tape device 200 directly writes the relevant LV2 and LV3 from the TVC 210 to the PV 310 for export (see S253 and S254 in FIG. 25).
There is known a technique for storing, in response to an export request, data of LVs cached in the TVC, among the LVs serving as export targets, in the PV independently of the order specified in the export request.
Related techniques are disclosed in, for example, Japanese Laid-open Patent Publication No. 2013-161234 and Japanese Laid-open Patent Publication No. 9-160727.
In the above-mentioned export processing, without considering the data sizes of the LVs 220 serving as storage targets, the virtual tape device 200 stores the LVs 220 serving as storage targets, in the specified PV 310 in accordance with the order specified in the LV list 410. Upon sensing that the data size of the LV 220 to be subsequently stored exceeds the remaining capacity of the PV, the virtual tape device 200 terminates the export processing to the relevant PV 310. In this case, an operator specifies another PV 310, thereby performing the export processing starting from the rest of the LV list 410.
For example, as illustrated in FIG. 26, it is assumed that three rolls of the PVs 310 for export (expressed as a PV1, a PV2, and a PV3) are registered and a size available for data storage per roll is 100 GB (bytes) with respect to all the PVs. It is also assumed that the LVs 220 and the order thereof, specified in the LV list 410, are the LV1 to the LV5 and the respective data sizes thereof are 10 GB, 10 GB, 90 GB, 70 GB, and 20 GB (a total data size is 200 GB).
In this case, in the first export processing, the virtual tape device 200 stores the LV1 and the LV2 in the PV1 and comes to an end. The reason is that the data size (90 GB) of the LV3 exceeds the free space (80 GB) of the PV1. In the second export processing, the virtual tape device 200 stores the LV3 in the PV2 and comes to an end. The reason is that the data size (70 GB) of the LV4 exceeds the free space (10 GB) of the PV2. In the third export processing, the virtual tape device 200 stores the LV4 and the LV5 in the PV3, and storing of all the LVs 220 finishes in a state in which the free space of the PV3 is 10 GB.
In the example of FIG. 26, 3 rolls of the PVs 310 each having the data storage size of 100 GB are used to export all the LVs 220 (a total data size: 200 GB) specified in the LV list 410 to the PVs 310.
In this way, depending on an order in which the LVs 220 are set in the LV list 410, PVs 310 more than the number of rolls of the PVs 310 sufficient for storing the total data size of the LVs 220 specified in the LV list 410 is used in some cases.